package org.example.SimpleFactory;

public class cofferstore {

    public coffee orderCoffee(String type) {
        // 生产咖啡的简单工厂
        SimpleCoffeeFactory factory = new SimpleCoffeeFactory();
        // 调用生产咖啡的方法
        coffee coffee = factory.createCoffee(type);
        // 加配料
        coffee.addMilk();
        coffee.addSugar();
        return coffee;
    }
}
